package com.service.staticanaly.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.mapper.staticanaly.StatisticsMapper;
import com.po.InformationInfo;
import com.po.NumberInfo;
import com.po.UserDownloadInfo;
import com.service.staticanaly.StatisticsService;

@Service
public class StatisticsServiceImp implements StatisticsService {
	@Resource(name = "statisticsMapper")
	private StatisticsMapper statisticsMapper;

	@Override
	public List<InformationInfo> getInformationListByBrowser(int offset, int limit, String ku, int count,
			String starttime, String endtime) {
		List<InformationInfo> list= statisticsMapper.getInformationListByBrowser(offset, limit, ku, count, starttime, endtime);		 
		return list;
	}

	@Override
	public List<InformationInfo> getInformationListByDownload(int offset, int limit, String ku, int count,
			String starttime, String endtime) {
		List<InformationInfo> list=statisticsMapper.getInformationListByDownload(offset, limit, ku, count, starttime, endtime);
		return list;
	}

	@Override
	public int getInformationCountByBrowser(int offset, int limit, String ku, int count, String starttime,
			String endtime) {
		int i=statisticsMapper.getInformationCountByBrowser(offset, limit, ku,  Math.abs(count), starttime, endtime);
		return i;
	}

	@Override
	public int getInformationCountByDownload(int offset, int limit, String ku, int count, String starttime,
			String endtime) {
		int i=statisticsMapper.getInformationCountByDownload(offset, limit, ku, Math.abs(count), starttime, endtime);
		return i;
	}

	@Override
	public List<UserDownloadInfo> getUserDownloadList(int offset, int limit, String ku, int count, String starttime,
			String endtime) {
		List<UserDownloadInfo> list=statisticsMapper.getUserDownloadList(offset, limit, ku, count, starttime, endtime);
		return list;
	}

	@Override
	public int getUserDownloadCount(int offset, int limit, String ku, int count, String starttime, String endtime) {
		int i=statisticsMapper.getUserDownloadCount(offset, limit, ku, Math.abs(count), starttime, endtime);
		return i;
	}

	@Override
	public List<NumberInfo> getUserNumberList(int offset, int limit,String type, String starttime, String endtime) {
		List<NumberInfo> list=statisticsMapper.getUserNumberList(offset, limit, type, starttime, endtime);
		return list;
	}

	@Override
	public int getUserNumberCount(int offset, int limit, String type, String starttime, String endtime) {
		int i=statisticsMapper.getUserNumberCount(offset, limit, type, starttime, endtime);
		return i;
	}

	@Override
	public List<NumberInfo> getInfoNumberList(int offset, int limit, String ku, String starttime, String endtime,String type) {
		List<NumberInfo> list=statisticsMapper.getInfoNumberList(offset, limit, ku, starttime, endtime,type);
		return list;
	}

	@Override
	public int getInfoNumberCount(int offset, int limit, String ku, String starttime, String endtime,String type) {
		int i=statisticsMapper.getInfoNumberCount(offset, limit, ku, starttime, endtime,type);
		return i;
	}

	@Override
	public List<NumberInfo> getAccessNumberList(int offset, int limit, String way, String starttime, String endtime) {
		List<NumberInfo> list=statisticsMapper.getAccessNumberList(offset, limit, way, starttime, endtime);
		return list;
	}

	@Override
	public int getAccessNumberCount(int offset, int limit, String way, String starttime, String endtime) {
		int i=statisticsMapper.getAccessNumberCount(offset, limit, way , starttime, endtime);
		return i;
	}

	@Override
	public int getInformationCountByUpload(int offset, int limit, String ku, String userid,String way, String starttime,
		String endtime) {
	    int i=statisticsMapper.getInformationCountByUpload(offset, limit, ku, userid,way, starttime, endtime);
	    return i;
	}

	@Override
	public List<InformationInfo> getInformationListByUpload(int offset, int limit, String ku, String userid,String way,
		String starttime, String endtime) {
	    List<InformationInfo> list=statisticsMapper.getInformationListByUpload(offset, limit, ku, userid, way,starttime, endtime);
	    return list;
	}

	
}
